<?php
/* Сообщения об ошибке регистрации */
if (count($user->reg_error) > 1) {
    if (!empty($user->reg_error[1])) {
        echo '<div class="error_message"><ul>';
        foreach ($user->reg_error as $val) {
            if (empty($val)) continue;
            echo '<li>'.$val.'</li>';
        }
        echo '</ul></div>';
    }
}
?>

<form action="registration" method="POST">

    <div class="auth_col1">Логин<sup class="neces">*</sup></div>
    <div class="auth_col2">
        <input type="text" class="input_text" name="login" placeholder="Логин" value="" pattern="^[a-zA-Z][a-zA-Z0-9-_\.]{2,20}$" required="required" autofocus="autofocus"></div>
    <div class="clear"></div>

    <div class="auth_col1">Имя<sup class="neces">*</sup></div>
    <div class="auth_col2">
        <input type="text" class="input_text" name="name" placeholder="Василий" value="" pattern="{3,255}" required></div>
    <div class="clear"></div>
    
    <div class="auth_col1">E-mail<sup class="neces">*</sup></div>
    <div class="auth_col2">
        <input type="email" class="input_text" name="email" placeholder="Почтовый@адрес" value="" required></div>
    <div class="clear"></div>

    <div class="auth_col1">Пароль<sup class="neces">*</sup></div>
    <div class="auth_col2">
        <input type="password" class="input_text" name="password" id="password" placeholder="Пароль" value="" pattern="{6,32}" required></div>
    <div class="clear"></div>

    <div class="auth_col1">Ещё разик<sup class="neces">*</sup></div>
    <div class="auth_col2">
        <input type="password" class="input_text" name="password_repeat" id="password_repeat" placeholder="Пароль" value="" pattern="{6,32}" required></div>
    <div class="clear"></div>
    
    <div class="auth_col1">&nbsp;</div>
    <div class="auth_col2" style="line-height: 32px; height: 32px;"><input type="checkbox" id="show_password" onClick="shAuthPassword(2);"><label for="show_password">Показывать пароль</label></div>
    <div class="clear"></div>

    <div class="auth_col1"></div>
    <div class="auth_col2"><img src="captcha.php" id="capcha-image" alt="Enter me" class="captcha"></div>
    <div class="clear"></div>
    
    <div class="auth_col1">Ответ<sup class="neces">*</sup></div>
    <div class="auth_col2">
        <input type="text" class="input_text" name="captcha" placeholder="Ответ" value="" pattern="\-?\d+(\.\d{0,})?" required>
    </div>
    <div class="clear"></div>

    <div class="auth_col1">&nbsp;</div>
    <div>
        <input type="submit" class="button_login" name="signup" value="Зарегистрироваться">
    </div>

</form>

